package com.tiantianfresh.view.service.impl;

import com.tiantianfresh.model.dao.AddressMapper;
import com.tiantianfresh.model.pojo.Address;
import com.tiantianfresh.view.service.AddAddressService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author FANGAO
 * @date 2021/12/7 - 下午 15:09
 */
@Service
public class AddAddressServiceImpl implements AddAddressService {

    @Resource
    private AddressMapper addressMapper;

    @Override
    public boolean addAddress(Address address) {
        address.setAddressState(0);
        if (addressMapper.addAddress(address)>0) return true;
        return false;
    }
}
